#ifndef __USART_STM32_H
#define __USART_STM32_H

/*---------------C Scope-----------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif
#include "fsl_lpuart.h"

#ifdef __cplusplus
}
#include "communication/usart/usart_base.h"
class Usart_RT1064 : public Usart_Base
{
	
	private:
		LPUART_Type *base=nullptr;
		lpuart_handle_t *handle=nullptr;
		uint8_t* tx_buffer=nullptr;
		uint8_t* rx_buffer=nullptr;
		lpuart_transfer_t* tx_trans=nullptr;
		lpuart_transfer_t* rx_trans=nullptr;
	
		uint16_t TX_MAX;
		uint16_t RX_MAX;
	
public:
		Usart_RT1064(LPUART_Type *_base,lpuart_handle_t *_handle,uint8_t* _tx_buffer,uint8_t* _rx_buffer,uint16_t _TX_MAX,uint16_t _RX_MAX,	lpuart_transfer_t* _tx_trans,lpuart_transfer_t* _rx_trans):
			base(_base),handle(_handle),tx_buffer(_tx_buffer),rx_buffer(_rx_buffer),TX_MAX(_TX_MAX),RX_MAX(_RX_MAX),tx_trans(_tx_trans),rx_trans(_rx_trans){}
    //UART_HandleTypeDef* huart = nullptr;
    //Usart_Stm32(UART_HandleTypeDef* _huart):huart(_huart){};
    virtual void UsartTransmitFloat() override;
    void SendData(float* data,uint8_t len);
		void SendCommonData(uint8_t* data,uint16_t len);
};

#endif
#endif

